import 'package:dependencies_examples/fl_chart/bar_chart.dart';
import 'package:dependencies_examples/fl_chart/scrollable.dart';
import 'package:flutter/material.dart';

class ChartExps extends StatelessWidget {
  const ChartExps({super.key});

  @override
  Widget build(BuildContext context) {
    final chartData = [
      DataModel(4, 6),
      DataModel(2, 7),
      DataModel(6, 5),
      DataModel(7, 8),
      DataModel(3, 6),

      DataModel(5, 9),
      DataModel(8, 4),
    ];

    final maxNum = [
      DataModel(4, 6),
      DataModel(2, 7),
      DataModel(6, 5),
      DataModel(7, 8),
      DataModel(3, 6),

      DataModel(5, 9),
      DataModel(8, 4),


      DataModel(6, 3),
      DataModel(4, 5),
      DataModel(5, 7),
      DataModel(3, 8),
      DataModel(7, 6),

      DataModel(2, 9),
      DataModel(8, 5),
    ];

    return Scaffold(
      body: Column(
        children: [
          // SimpleExp(data: chartData),
          // MaxNum(data: chartData),
          ScrollableExp(data: maxNum)
        ],
      ),
    );
  }
}

class DataModel {
  final double mileage;
  final double duration;

  DataModel(this.mileage, this.duration);
}
